import Vue from 'vue';
import Router from 'vue-router';
import LoginPage from '@/views/LoginPage.vue';
import DashboardPage from '@/views/DashboardPage.vue';
import DailyExpenseManagement from '@/views/DailyExpenseManagement.vue';
import WeightManagement from '@/views/WeightManagement.vue';
import TravelManagement from '@/views/TravelManagement.vue';
import MenuManagement from '@/views/MenuManagement.vue';
import StudyManagement from '@/views/StudyManagement.vue';
import MajorExpenseManagement from '@/views/MajorExpenseManagement.vue';
import OrderConfirmation from '@/views/OrderConfirmation.vue'; // 新增

Vue.use(Router);

export default new Router({
    mode: 'history',
    routes: [
        {
            path: '/',
            name: 'LoginPage',
            component: LoginPage
        },
        {
            path: '/dashboard',
            name: 'DashboardPage',
            component: DashboardPage,
            children: [
                {
                    path: 'daily-expense-management',
                    name: 'daily-expense-management',
                    component: DailyExpenseManagement
                },
                {
                    path: 'major-expense-management',
                    name: 'major-expense-management',
                    component: MajorExpenseManagement
                },
                {
                    path: 'menu-management',
                    name: 'menu-management',
                    component: MenuManagement
                },
                {
                    path: 'study-management',
                    name: 'study-management',
                    component: StudyManagement
                },
                {
                    path: 'weight-management',
                    name: 'weight-management',
                    component: WeightManagement
                },
                {
                    path: 'travel-management',
                    name: 'travel-management',
                    component: TravelManagement
                },
                {
                    path: '/order-confirmation',
                    name: 'OrderConfirmation',
                    component: OrderConfirmation
                }
            ]
        }
    ]
});
